home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / src / utils / adt / misc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  887 b   |  48 lines

  1. /* RcsId("$Header: /private/postgres/src/utils/adt/RCS/misc.c,v 1.15 1992/07/29 16:00:32 mao Exp $"); */
  2.  
  3. #include <sys/file.h>
  4. #include "tmp/c.h"
  5. #include "tmp/postgres.h"
  6. #include "tmp/datum.h"
  7. #include "catalog/pg_type.h"
  8.  
  9. /*-------------------------------------------------------------------------
  10.  * Check if data is Null 
  11.  */
  12.  
  13.  
  14. bool NullValue(value, isNull)
  15. Datum value;
  16. Boolean *isNull;
  17. {
  18.     if (*isNull) {
  19.         *isNull = false;
  20.         return(true);
  21.     }
  22.     return(false);
  23.     
  24. }
  25.  
  26. /*----------------------------------------------------------------------*
  27.  *     check if data is not Null                                        *
  28.  *--------------------------------------------------------------------- */
  29.  
  30. bool NonNullValue(value, isNull)
  31. Datum value;
  32. Boolean *isNull;
  33. {
  34.     if (*isNull) {
  35.         *isNull = false;
  36.         return(false);
  37.     }
  38.     return(true);
  39.         
  40. }
  41.  
  42. int32
  43. userfntest(i)
  44.     int i;
  45. {
  46.     return (i);
  47. }
  48.